<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">

    <link rel="icon" href="<%= BASE_URL %>favicon.ico">
    <title>企瑞宝</title>
  </head>
  <body>

    <noscript>
      <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
    </noscript>
    <div id="app"></div>
    <!-- built files will be auto injected -->
    <script>
      var deviceWidth
      setHtmlFontSize()
  
      if (window.addEventListener) {
        window.addEventListener('resize', function () {
          setHtmlFontSize()
        }, false)
      }
      function setHtmlFontSize() {
        // 1366是设计稿的宽度，当大于1920时采用1920宽度   1920/16=120    这里将1rem等于16px
        deviceWidth = document.documentElement.clientWidth > 1920 ? 1920 : document.documentElement.clientWidth
        document.getElementsByTagName('html')[0].style.cssText = 'font-size:' + deviceWidth / 19.2 + 'px !important'
        // 输出设备小于750时，固定font-size为12px；
        if (document.documentElement.clientWidth <= 780) {
          document.getElementsByTagName('html')[0].style.cssText = 'font-size:' +  100 + 'px !important'
        }
      }
    </script>
  </body>
</html>
